import VueRouter from 'vue-router'

import login from './templates/Login.vue'

//导入 register 组件
import register from './templates/Register.vue'

import item1 from './com/item1.vue'
import item2 from './com/item2.vue'
//3，创建路由对象
var router=new VueRouter({
    routes:[
        {
            path:'/login',
            component:login,
            children:[
                {path:'item1',component:item1},
                {path:'item2',component:item2}
            ]
        },
        {path:'/register',component:register}
    ]
})

export default router